﻿@using System.Threading
@using Turquoise.Globalization
@using Turquoise.Web.Common.Helpers
@model Turquoise.Entities.Complex.UserModels.UpdateModel

@{
    ViewBag.Title = @Resources.UpdateMyInformation;
    Layout = "../../Masters/ContentMaster/Index.cshtml";
}

<div class="container-fluid">
    <div class="row">
        <div class="col-lg-12">
            <h1 class="page-header">@Resources.UpdateMyInformation</h1>
        </div>
    </div>
    <div class="row">

        <div class="col-lg-12">
            <div class="panel panel-default">
                <div class="panel-heading">
                    @Resources.UpdateMyInformation
                </div>
                <div class="panel-body">
                    <div class="row">
                        <div class="col-lg-8">
                            <div class="well" id="user-page-well">
                                @using (Html.BeginForm("UpdateMyInformation", "User", FormMethod.Post, new { @role = "form" }))
                                {
                                    <div class="form-group">
                                        <label class="control-label" for="User_Id">@Resources.UserId</label>
                                        @Html.TurquoiseTextBoxFor(m => m.User.Id, new { @class = "form-control", @readonly = "readonly" })
                                    </div>

                                    <div class="form-group">
                                        <label class="control-label" for="User_Username">@Resources.Username</label>
                                        @Html.TurquoiseTextBoxFor(m => m.User.Username, new { @class = "form-control", @readonly = "readonly" })
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label" for="User_Email">@Resources.Email</label>
                                        @Html.TurquoiseTextBoxFor(m => m.User.Email, new { @class = "form-control", @placeholder = Resources.Email, type = "email" })
                                        @Html.ValidationMessageFor(m => m.User.Email)
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label" for="User_FirstName">@Resources.FirstName</label>
                                        @Html.TurquoiseTextBoxFor(m => m.User.FirstName, new {@class = "form-control", @placeholder = Resources.FirstName, @maxlength = 64})
                                        @Html.ValidationMessageFor(m => m.User.FirstName)
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label" for="User_LastName">@Resources.Name</label>
                                        @Html.TurquoiseTextBoxFor(m => m.User.LastName, new { @class = "form-control", @placeholder = Resources.LastName, @maxlength = 64 })
                                        @Html.ValidationMessageFor(m => m.User.LastName)
                                    </div>

                                    <div class="form-group">
                                        <label>@Resources.Language</label>
                                        @Html.TurquoiseDropDownListFor(m => m.SelectedLanguageCode, new SelectList(Model.Languages, "LanguageCode", "LanguageName", Thread.CurrentThread.CurrentCulture), new { @class = "form-control" })
                                    </div>

                                    <div class="form-group">
                                        <label>@Resources.CreateDate</label>
                                        <input type="text" value="@Model.User.CreateDate.ToString("dd/MM/yyyy HH:mm:ss")" class="form-control" readonly="readonly"/>
                                    </div>
                                    <div class="form-group">
                                        <label>@Resources.CreatedBy</label>
                                        @Html.TurquoiseTextBoxFor(m => m.User.User_CreatedBy.FullName, new { @class = "form-control", @readonly = "readonly" })
                                    </div>
                                    <div class="form-group">
                                        <label>@Resources.UpdateDate</label>
                                        <input type="text" value="@Model.User.UpdateDate.ToString("dd/MM/yyyy HH:mm:ss")" class="form-control" readonly="readonly"/>
                                    </div>
                                    <div class="form-group">
                                        <label>@Resources.UpdatedBy</label>
                                        @Html.TurquoiseTextBoxFor(m => m.User.User_UpdatedBy.FullName, new { @class = "form-control", @readonly = "readonly" })
                                    </div>
                                    <button class="btn btn-primary"><i class="fa fa-save"></i>&nbsp;@Resources.Save</button>
                                }
                            </div>

                        </div>
                        <div class="col-lg-4">
                            @Html.Action("UserSidebar", "User")
                        </div>
                    </div>

                </div>

            </div>

            <div class="row">
                <div class="col-lg-12 text-center">
                    @Html.TurquoiseAlertFor(m => m.Message, "div", Model.Message, new { @class = "alert alert-danger" })
                </div>
            </div>
        </div>
    </div>
</div>

